package pers.zxk.jlytnews.dao;

import pers.zxk.jlytnews.entity.WxAccountInfo;
import pers.zxk.jlytnews.entity.WxArticle;
import pers.zxk.jlytnews.entity.WxChannel;

import java.sql.SQLException;
import java.util.List;

/**
 * 微信文章分类（公众号）接口
 */
public interface WxChannelDao {
    //添加本地新闻
    public boolean addWxChannel(String title, String fakeid,String nickname,String headimg) throws SQLException, ClassNotFoundException;
    //通过id删除新闻
    public boolean delWxChannel(int id) throws SQLException, ClassNotFoundException;
    //通过id更新新闻
    public boolean updateWxChannel(int id, String title, String fakeid,String nickname,String headimg) throws SQLException, ClassNotFoundException;
    //通过id获取新闻
    public WxChannel getWxChannel(int id) throws SQLException, ClassNotFoundException;

    public List<WxChannel> getWxChannelList() throws SQLException, ClassNotFoundException;

    public boolean setSort(int id ,int sort) throws SQLException, ClassNotFoundException;

    //更新微信公众号登录信息
    public boolean updateWxAccount(String token,String cookie) throws SQLException, ClassNotFoundException;

    //获取微信公众号登录信息
    public WxAccountInfo getWxAccount() throws SQLException, ClassNotFoundException;

}
